import { defineStore } from 'pinia'
import { ref } from "vue";
import { getCategoryAPI } from "@/apis/layout";

// 导航分类
export const useCategoryStore = defineStore('category', () => {
    let categoryList = ref([])
    const getCategoryList = async () => {
        const res = await getCategoryAPI();
        categoryList.value = res.data.result
    }
    return {
        categoryList,
        getCategoryList
    }
})